//
//  HMSportMapModelViewController.m
//  XRSport
//
//  Created by acer on 16/10/25.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "HMSportMapModelViewController.h"

@interface HMSportMapModelViewController ()
@property (strong, nonatomic) IBOutletCollection(UIButton) NSArray *mapModel;

@end

@implementation HMSportMapModelViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    for (UIButton *button in _mapModel) {
        button.selected = (button.tag == _currentType);
       
    }
}

- (IBAction)mapModelBtnClick:(UIButton *)sender {
    
    if (self.currentType == sender.tag) {
        return;
    }
    self.currentType = sender.tag;
    if (_didSelectedMapModel != nil ) {
        _didSelectedMapModel(self.currentType);
    }
    for (UIButton *button in _mapModel) {
        button.selected = (button == sender);
    
    }
   
}


@end
